﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Story_Details.aspx.vb" Inherits="AbuDhabi_Speech.Story_Details" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
    <br />
</p>
<p>
</p>
<p>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:AbuDhabi_Speech_ConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:AbuDhabi_Speech_ConnectionString.ProviderName %>" 
        SelectCommand="SELECT [Title], [Post_details], [Author], [Date_Posted], [Picture] FROM [Posts] WHERE ([ID] = ?)">
        <SelectParameters>
            <asp:QueryStringParameter DefaultValue="1" Name="ID" QueryStringField="StoryID" 
                Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        CellPadding="4" DataSourceID="SqlDataSource1" ForeColor="#333333" 
        GridLines="None" Height="203px" Width="874px">
        <AlternatingRowStyle BackColor="White" />
        <Columns>
            <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" >
            <ControlStyle CssClass="Detail_Title" />
            <ItemStyle Width="17.5%" Wrap="False"/>
            </asp:BoundField>
            <asp:BoundField DataField="Post_details" HeaderText="Post Details" 
                SortExpression="Post_details" >
            <ItemStyle Width="30%" />
            </asp:BoundField>
            <asp:BoundField DataField="Author" HeaderText="Author" 
                SortExpression="Author" >
            <ItemStyle Width="10%" />
            </asp:BoundField>
            <asp:BoundField DataField="Date_Posted" HeaderText="Date Posted" 
                SortExpression="Date_Posted" DataFormatString="{0:g}" >
            <ItemStyle Width="7.5%" Wrap="False" />
            </asp:BoundField>
            <asp:ImageField DataImageUrlField="Picture" HeaderText="Picture">
            <ItemStyle Width="35%" Wrap="False" />
            </asp:ImageField>
        </Columns>
        <EditRowStyle BackColor="#2461BF" />
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#EFF3FB" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#F5F7FB" />
        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
        <SortedDescendingCellStyle BackColor="#E9EBEF" />
        <SortedDescendingHeaderStyle BackColor="#4870BE" />
    </asp:GridView>
</p>
    <br />
    Comments:<br />
<br />
    <asp:GridView ID="GridView2" runat="server" AllowPaging="True" 
        AllowSorting="True" AutoGenerateColumns="False" BackColor="White" 
        BorderColor="#3366CC" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
        DataSourceID="commentsdatasource">
        <Columns>
            <asp:BoundField DataField="Comment" HeaderText="Comment" 
                SortExpression="Comment" />
            <asp:BoundField DataField="Comment_author" HeaderText="Comment_author" 
                SortExpression="Comment_author" />
        </Columns>
        <FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
        <HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" />
        <PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
        <RowStyle BackColor="White" ForeColor="#003399" />
        <SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
        <SortedAscendingCellStyle BackColor="#EDF6F6" />
        <SortedAscendingHeaderStyle BackColor="#0D4AC4" />
        <SortedDescendingCellStyle BackColor="#D6DFDF" />
        <SortedDescendingHeaderStyle BackColor="#002876" />
    </asp:GridView>
    <asp:SqlDataSource ID="commentsdatasource" runat="server" 
        ConnectionString="<%$ ConnectionStrings:AbuDhabi_Speech_ConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:AbuDhabi_Speech_ConnectionString.ProviderName %>" 
        SelectCommand="SELECT [Comment], [Comment_author] FROM [Comments] WHERE ([Post] = ?)">
        <SelectParameters>
            <asp:QueryStringParameter DefaultValue="0" Name="Post" 
                QueryStringField="StoryID" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
<br />
<br />
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/StoryList.aspx">Back to list of stories</asp:HyperLink>
<br />
<br />
</asp:Content>
